package com.jinhongone.pattern.behavior.mediator;

/**
 * @author jinho
 * @className Test
 * @description 测试类
 * @date 2025/4/16 17:03
 */
public class Test {
    public static void main(String[] args) {
        //创建中介
        MediatorStructure ms = new MediatorStructure();
        //创建同事
        HouseOwner ho = new HouseOwner("张三",ms);
        Tenant tenant = new Tenant("李四",ms);
        //中介关联同事
        ms.setTenant(tenant);
        ms.setHouseOwner(ho);
        //同事之间关联
        tenant.contact("我要租三室一厅的房子!");
        ho.contact("我有,价格面谈");

    }
}
